#ifndef __MOVE_H
#define __MOVE_H

#include <stdint.h>
#include <stdio.h>
#include "mcu_param.h"
#include "stepper_param.h"

#define DIR_FRONT 0U
#define DIR_BACK 1U

#define MAX_DISRACE 65000U

#define SUCCESS 0U
#define ERR_DISTANCE_TOO_SHORT 10U
#define ERR_DISTANCE_TOO_LONG 11U

typedef enum {
    SPEED_1 = 1,
    SPEED_2,
    SPEED_3,
    SPEED_4,
    SPEED_5,
    SPEED_6,
    SPEED_7,
    SPEED_8,
    SPEED_9,
}speed_t;

void x_mover_init();
uint8_t x_move(uint8_t dir, speed_t speed, float distance);

#endif